package viewbuilder.decoratorexample

class MainLayout {

    def builder

    def title(pageTitle) {
        builder.title("My Site - ${pageTitle}")
    }

    def body(closure) {
        builder.body {
            div(id: 'primaryNav') {
                ul {
                    li('item 1')
                    li('item 2')
                    li('item 3')
                }
            }
            div(id: 'mainContainer') {
                closure()
            }
            div(id: 'footer') {
                p("Contact use, coyright, etc.")
            }
        }        
    }
}